12. Ubuntu Install and Common Troubleshooting

Blank Ubuntu 16.04 Project Setup Instructions

Unfortunately, this project will not work in the Udacity provided VM or on less powerful computers due to the significant processing requirements of the project. In the next concept we will be providing you a digital workspace to complete this project. The instructions for this workspace can be found here.

However, if you would like to run on your TX2 or powerful Linux desktop computer then the install instructions are as follows; remember you could use jetson_clocks.sh script in the home folder to speed the TX2 up!

1. Install ROS: sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' && sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 && sudo apt-get update && sudo apt-get install ros-kinetic-desktop-full && sudo rosdep init && rosdep update && echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc && source ~/.bashrc

Note: Skip this step if ROS is already installed.

2. Install dependencies: sudo apt-get install ros-kinetic-rtabmap ros-kinetic-rtabmap-ros && sudo apt-get remove ros-kinetic-rtabmap ros-kinetic-rtabmap-ros

3. Install RTAB-Map: cd ~ && git clone https://github.com/introlab/rtabmap.git rtabmap && cd rtabmap/build && cmake .. && make && sudo make install

4. Create .gazebo folder: Open gazebo and then close it.

5. Add model collision adjustments: curl -L https://s3-us-west-1.amazonaws.com/udacity-robotics/Term+2+Resources/P3+Resources/models.tar.gz | tar zx -C ~/.gazebo/

You are all setup! You can now follow along the provided project instructions.

Troubleshooting

If you find yourself with some Linux related errors check here for possible solutions


Problem: RGB-D Point cloud appears to be pointing up

Solution: The depth cloud is generated along the Z axis and therefore needs to be rotated in order to correctly visualize it. More info here and here


Problem: rtabmap_database viewer does not work

Solution: sudo apt-get remove ros-kinetic-rtabmap


Problem: reference to `drmFreeDevices'
collect2: error: ld returned 1 exit status
app/src/CMakeFiles/rtabmap.dir/build.make:491: recipe for target '../bin/rtabmap' failed
make[2]: *** [../bin/rtabmap] Error 1
CMakeFiles/Makefile2:416: recipe for target 'app/src/CMakeFiles/rtabmap.dir/all' failed
make[1]: *** [app/src/CMakeFiles/rtabmap.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Solution:
cd /usr/lib/aarch64-linux-gnu && sudo rm libGL.so && sudo ln -s /usr/lib/aarch64-linux-gnu/tegra/libGL.so libGL.so


**Problem: **
/home/nvidia/catkin_ws/build/rtabmap_ros/setup_custom_pythonpath.sh: 4: exec: /home/nvidia/catkin_ws/src/rtabmap_ros/cfg/Camera.cfg: Permission denied
rtabmap_ros/CMakeFiles/rtabmap_ros_gencfg.dir/build.make:63: recipe for target '/home/nvidia/catkin_ws/devel/include/rtabmap_ros/CameraConfig.h' failed
make[2]: *** [/home/nvidia/catkin_ws/devel/include/rtabmap_ros/CameraConfig.h] Error 126

Solution: $ chmod +x /home/nvidia/catkin_ws/src/rtabmap_ros/cfg/Camera.cfg


Problem: teleop node does not launch

Solution: $ chmod +x teleop


Problem: What should RViz look like at first boot?

Solution: See the image below. Note that Gazebo view and terminals are subject to how you arrange them.

Example Boot View

Example Boot View